package com.yalu.entity.data; 

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class ProductsKey implements Serializable{
	
	private static final long serialVersionUID = -6082812210971537419L;
	private String sku; 
	private String product_id;
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass().getPackage() != obj.getClass().getPackage()) {
			return false;
		}
		final ProductsKey other = (ProductsKey) obj;
		if (sku != null&&product_id!=null&&other.getSku() != null&&other.getProduct_id()!=null) {
			if (sku.equals(other.getSku())&&product_id.equals(other.getProduct_id())) {
				return true;
			}
		} 
		return false;
	}
	@Override
	public int hashCode() {
		return sku == null ? System.identityHashCode(this) : sku.hashCode();
	}
	public String getSku() {
		return sku;
	}
	public void setSku(String sku) {
		this.sku = sku;
	}
	public String getProduct_id() {
		return product_id;
	}
	public void setProduct_id(String product_id) {
		this.product_id = product_id;
	}
	
}
 